import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const product: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "课程管理",
			key: "product"
		},
		children: [
			{
				path: "/courses",
				element: lazyLoad(React.lazy(() => import("@/pages/course/List/index"))),
				meta: {
					title: "课程管理",
					requiresAuth: true,
					key: "courses",
					icon: ""
				}
			},
			{
				path: "/courseCreate",
				element: lazyLoad(React.lazy(() => import("@/pages/course/Create/index"))),
				meta: {
					title: "创建新课程",
					requiresAuth: true,
					key: "courseCreate",
					icon: ""
				}
			},
			{
				path: "/courseOperate",
				element: lazyLoad(React.lazy(() => import("@/pages/course/Operate/index"))),
				meta: {
					title: "课程运营",
					requiresAuth: true,
					key: "courseOperate",
					icon: ""
				}
			}
		]
	}
];

export default product;
